package com.mallcloud.mall.mall.api.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Optional;

/**
 * 停车积分-抵扣费
 **/
@ApiModel(value="ParkingPointsPayDiscount",description="停车积分-抵扣费")
@Data
public class ParkingPointsPayDiscount {

    @ApiModelProperty("卡号")
	private String cardNo;
    @ApiModelProperty("抵扣积分")
	private String discountPoints;
    @ApiModelProperty("门店号")
	private String storeNo;
    @ApiModelProperty("说明")
	private String memo;

	@ApiModelProperty(value = "返回id 0-核销成功，1-核销失败", hidden = true)
	private Integer messageId;
	@ApiModelProperty(value = "执行提示信息", hidden = true)
	private String message;

	public boolean isSuccess() {
		return Optional.ofNullable(this.messageId).map(x -> x.equals(1)).orElse(false);
	}
}
